package com.lx.forum.exception;

import com.lx.forum.common.AppResult;

/**
 * @author 李夏
 * @version 1.0
 */
public class ApplicationException extends RuntimeException{
    protected AppResult errResult;

    public ApplicationException(AppResult errResult) {
        super(errResult.getMessage());
        this.errResult = errResult;
    }

    /**
     * 重写父类的构造方法
     * @param message
     */

    public ApplicationException(String message) {
        super(message);
    }

    public ApplicationException(String message, Throwable cause) {
        super(message, cause);
    }

    public ApplicationException(Throwable cause) {
        super(cause);
    }


    public AppResult getErrResult() {
        return errResult;
    }
}
